package com.youlai.boot.modules.tp.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 销售趋势响应VO
 * 
 * @author xiheforever
 * @since 2025-06-04
 */
@Schema(description = "销售趋势响应数据")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SalesTrendResponseVO {

    @Schema(description = "趋势数据")
    private List<SalesTrendPointVO> data;

    @Schema(description = "总计信息")
    private SummaryVO summary;

    @Schema(description = "销售趋势数据点")
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SalesTrendPointVO {

        @Schema(description = "日期", example = "2025-06-01")
        private String date;

        @Schema(description = "GMV（万元）")
        private BigDecimal gmv;

        @Schema(description = "订单量")
        private Integer orders;
    }

    @Schema(description = "销售趋势汇总信息")
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SummaryVO {

        @Schema(description = "总GMV（万元）")
        private BigDecimal totalGMV;

        @Schema(description = "总订单量")
        private Integer totalOrders;

        @Schema(description = "平均GMV（万元）")
        private BigDecimal avgGMV;

        @Schema(description = "平均订单量")
        private Integer avgOrders;
    }
} 